<?php
class Pageley_Domain_Attribute_Enumeration extends Pageley_Domain_Attribute_Basic {

	private $className;

	public function __construct($name, $className, $validators = null) {
		parent::__construct($name, $validators, new Pageley_Serializer_Converter_Enumeration($this));
		$this->addValidator(new Pageley_Domain_Validator_Enumeration($className));
		$this->className = $className;
	}

    public function valueOf($name) {
        return Pageley_Util_Reflection::getStaticField($this->className, $name);
    }

    public function getClassName() {
    	return $this->className;
    }

}